]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Add message close button styling
authorJoonas Henriksson <joonas.henriksson@gmail.com>
Tue, 19 Nov 2019 17:40:09 +0000 (19:40 +0200)
committerJoonas Henriksson <joonas.henriksson@gmail.com>
Mon, 25 Nov 2019 16:02:07 +0000 (18:02 +0200)
Since the notification message close button had no border, or mouse
over effect, there was no way to determine whether the mouse cursor
were over the button.

Improve this by adding a message-close-button class for the close
button, and a styling for its hovered state, based on media control
button styling.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/855

data/theme/gnome-shell-sass/_common.scss
js/ui/messageList.js

index bddcedf2421ece5a6c6143acd8540dda8ce02f0b..cd6eea7d94915763b19c24c2aa657c9dc96ab014 100644 (file)
@@ -1152,6 +1152,11 @@ StScrollBar {
             padding: 10px;
           }
 
+          .message-close-button {
+            color: lighten($fg_color, 15%);
+            &:hover { color: darken($fg_color, 10%); }
+          }
+
           .message-media-control {
             padding: 12px;
             color: lighten($fg_color, 15%);
index 3188d0377fa67fd512a6deb67cd624ebfc328220..e798d0bfc329b88618bd133d6735642093dd861f 100644 (file)
@@ -357,7 +357,10 @@ var Message = GObject.registerClass({
 
         let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
                                       icon_size: 16 });
-        this._closeButton = new St.Button({ child: closeIcon, opacity: 0 });
+        this._closeButton = new St.Button({
+            style_class: 'message-close-button',
+            child: closeIcon, opacity: 0,
+        });
         titleBox.add_actor(this._closeButton);
 
         this._bodyStack = new St.Widget({ x_expand: true });